www.gusucode.com > ROCKOA PHP协同办公OA办公系统 v2.0PHP源码程序 > ROCKOA PHP协同办公OA办公系统 v2.0/rockoa_v2.0/rockoa_v2.0/webrock/model/todoModel.php
<?php class todoClassModel extends Model { /** 添加通知 */ public function add($uid, $title, $mess, $arrs=array()) { $arr['title'] = $title; $arr['mess'] = $mess; $arr['status'] = '0'; $arr['optdt'] = $this->rock->now; foreach($arrs as $k=>$v)$arr[$k] = $v; $uid = ''.$uid.''; $suid = explode(',', $uid); foreach($suid as $suids){ $arr['uid'] = $suids; $this->insert($arr); } } /** 添加唯一的通知 */ public function addtz($uid, $title, $mess, $table='', $mid='') { $where = ''; if($table != '')$where = " and `table`='$table'"; if($mid != '')$where .= " and `mid`='$mid'"; if($where != ''){ $this->delete("`uid` in($uid) $where"); } $this->add($uid, $title, $mess, array( 'table' => $table, 'mid' => $mid )); } public function deltodo($table='', $mid='') { } }